package com.hotec.PROJECT_NAME.modules.cmd.interceptor;

import com.hotec.PROJECT_NAME.component.exception.exc.BizException;
import com.hotec.PROJECT_NAME.modules.cmd.support.Command;
import com.hotec.PROJECT_NAME.modules.cmd.support.CommandContext;

/**
 * Created by ldz666 on 2022/9/14.
 */
public class CommandInvoker extends AbstractCommandInterceptor {

    @Override
    public <T> T execute(CommandContext context, Command<T> command) {
        return command.execute(context);
    }


    @Override
    public void setNext(CommandInterceptor next) {
        throw new BizException("commandInvoker 不能设置next属性");
    }

}
